package campus.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AccountExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AccountExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andZtIdIsNull() {
            addCriterion("zt_id is null");
            return (Criteria) this;
        }

        public Criteria andZtIdIsNotNull() {
            addCriterion("zt_id is not null");
            return (Criteria) this;
        }

        public Criteria andZtIdEqualTo(Integer value) {
            addCriterion("zt_id =", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdNotEqualTo(Integer value) {
            addCriterion("zt_id <>", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdGreaterThan(Integer value) {
            addCriterion("zt_id >", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("zt_id >=", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdLessThan(Integer value) {
            addCriterion("zt_id <", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdLessThanOrEqualTo(Integer value) {
            addCriterion("zt_id <=", value, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdIn(List<Integer> values) {
            addCriterion("zt_id in", values, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdNotIn(List<Integer> values) {
            addCriterion("zt_id not in", values, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdBetween(Integer value1, Integer value2) {
            addCriterion("zt_id between", value1, value2, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtIdNotBetween(Integer value1, Integer value2) {
            addCriterion("zt_id not between", value1, value2, "ztId");
            return (Criteria) this;
        }

        public Criteria andZtNameIsNull() {
            addCriterion("zt_name is null");
            return (Criteria) this;
        }

        public Criteria andZtNameIsNotNull() {
            addCriterion("zt_name is not null");
            return (Criteria) this;
        }

        public Criteria andZtNameEqualTo(String value) {
            addCriterion("zt_name =", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameNotEqualTo(String value) {
            addCriterion("zt_name <>", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameGreaterThan(String value) {
            addCriterion("zt_name >", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameGreaterThanOrEqualTo(String value) {
            addCriterion("zt_name >=", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameLessThan(String value) {
            addCriterion("zt_name <", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameLessThanOrEqualTo(String value) {
            addCriterion("zt_name <=", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameLike(String value) {
            addCriterion("zt_name like", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameNotLike(String value) {
            addCriterion("zt_name not like", value, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameIn(List<String> values) {
            addCriterion("zt_name in", values, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameNotIn(List<String> values) {
            addCriterion("zt_name not in", values, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameBetween(String value1, String value2) {
            addCriterion("zt_name between", value1, value2, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtNameNotBetween(String value1, String value2) {
            addCriterion("zt_name not between", value1, value2, "ztName");
            return (Criteria) this;
        }

        public Criteria andZtCdateIsNull() {
            addCriterion("zt_cdate is null");
            return (Criteria) this;
        }

        public Criteria andZtCdateIsNotNull() {
            addCriterion("zt_cdate is not null");
            return (Criteria) this;
        }

        public Criteria andZtCdateEqualTo(Date value) {
            addCriterion("zt_cdate =", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateNotEqualTo(Date value) {
            addCriterion("zt_cdate <>", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateGreaterThan(Date value) {
            addCriterion("zt_cdate >", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateGreaterThanOrEqualTo(Date value) {
            addCriterion("zt_cdate >=", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateLessThan(Date value) {
            addCriterion("zt_cdate <", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateLessThanOrEqualTo(Date value) {
            addCriterion("zt_cdate <=", value, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateIn(List<Date> values) {
            addCriterion("zt_cdate in", values, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateNotIn(List<Date> values) {
            addCriterion("zt_cdate not in", values, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateBetween(Date value1, Date value2) {
            addCriterion("zt_cdate between", value1, value2, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCdateNotBetween(Date value1, Date value2) {
            addCriterion("zt_cdate not between", value1, value2, "ztCdate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateIsNull() {
            addCriterion("zt_creadate is null");
            return (Criteria) this;
        }

        public Criteria andZtCreadateIsNotNull() {
            addCriterion("zt_creadate is not null");
            return (Criteria) this;
        }

        public Criteria andZtCreadateEqualTo(Date value) {
            addCriterion("zt_creadate =", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateNotEqualTo(Date value) {
            addCriterion("zt_creadate <>", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateGreaterThan(Date value) {
            addCriterion("zt_creadate >", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateGreaterThanOrEqualTo(Date value) {
            addCriterion("zt_creadate >=", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateLessThan(Date value) {
            addCriterion("zt_creadate <", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateLessThanOrEqualTo(Date value) {
            addCriterion("zt_creadate <=", value, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateIn(List<Date> values) {
            addCriterion("zt_creadate in", values, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateNotIn(List<Date> values) {
            addCriterion("zt_creadate not in", values, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateBetween(Date value1, Date value2) {
            addCriterion("zt_creadate between", value1, value2, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtCreadateNotBetween(Date value1, Date value2) {
            addCriterion("zt_creadate not between", value1, value2, "ztCreadate");
            return (Criteria) this;
        }

        public Criteria andZtRootIsNull() {
            addCriterion("zt_root is null");
            return (Criteria) this;
        }

        public Criteria andZtRootIsNotNull() {
            addCriterion("zt_root is not null");
            return (Criteria) this;
        }

        public Criteria andZtRootEqualTo(String value) {
            addCriterion("zt_root =", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootNotEqualTo(String value) {
            addCriterion("zt_root <>", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootGreaterThan(String value) {
            addCriterion("zt_root >", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootGreaterThanOrEqualTo(String value) {
            addCriterion("zt_root >=", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootLessThan(String value) {
            addCriterion("zt_root <", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootLessThanOrEqualTo(String value) {
            addCriterion("zt_root <=", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootLike(String value) {
            addCriterion("zt_root like", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootNotLike(String value) {
            addCriterion("zt_root not like", value, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootIn(List<String> values) {
            addCriterion("zt_root in", values, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootNotIn(List<String> values) {
            addCriterion("zt_root not in", values, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootBetween(String value1, String value2) {
            addCriterion("zt_root between", value1, value2, "ztRoot");
            return (Criteria) this;
        }

        public Criteria andZtRootNotBetween(String value1, String value2) {
            addCriterion("zt_root not between", value1, value2, "ztRoot");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}